@import views.editor.GenerateId
@import org.silkframework.workspace.Project

@(id: String,
required: Boolean, weight: Int, threshold: Double,
plugin: org.silkframework.runtime.plugin.PluginDescription[_],
parameterValues: Seq[String],
x: Int, y: Int, display: Boolean,
project: Project)

@operatorBox("Compare", id, plugin, parameterValues, x, y, display, project) {
<div class="param_element">
  <label id="@{GenerateId(id, display)}_param_required" class="param_label" tabindex="-1">Required</label>
  <div class="mdl-tooltip" for="@{GenerateId(id, display)}_param_required">
    If required is set, the parent aggregation should only generate a result if this
    operator yields a value.
    A comparison will only yield a value if in turn both input operators yield values.
  </div>
  <input type="checkbox" name="required" @if(required) {checked="checked"}/>
</div>
<div class="param_element">
  <label id="@{GenerateId(id, display)}_param_threshold" class="param_label" tabindex="-1">Threshold</label>
  <div class="mdl-tooltip" for="@{GenerateId(id, display)}_param_threshold">
    The maximum distance. For normalized distance measures, the threshold should be between 0.0 and 1.0.
  </div>
  <input class="param_value" type="text" name="threshold" value="@threshold"/>
</div>
<div class="param_element">
  <label id="@{GenerateId(id, display)}_param_weight" class="param_label" tabindex="-1">Weight</label>
  <div class="mdl-tooltip" for="@{GenerateId(id, display)}_param_weight">
    The weight parameter can be used by the parent aggregation when combining
    its input values. Only certain aggregations will consider weighted inputs. Examples are the weighted average
    aggregation, quadraticMean and geometricMean.
  </div>
  <input class="param_value" type="text" name="weight" value="@weight"/>
</div>
}